<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" import="java.sql.*, java.util.Date"%>
<%@ page import="com.google.code.facebookapi.FacebookException" %>
<%@ page import="com.google.code.facebookapi.FacebookJaxbRestClient" %>
<%@ page import="com.google.code.facebookapi.Permission" %>
<%@ page import="com.facebook.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
	<%
	
		Date Now = new Date() ;
		
		String date = (Now.getYear() + 1900) + "/";
		       date = date + (Now.getMonth() + 1) + "/";
		       date = date + Now.getDate();
			
	%>
	<br>
	<FORM action="AddBook" method=POST>
		<a href="OpenBook">取得資料庫的記錄</a> <br>
		<%
		FaceBookFun fbFun = new FaceBookFun();
		FacebookJaxbRestClient fbclient = (FacebookJaxbRestClient)session.getAttribute("FacebookClient"); %>
		<%=fbclient.users_getLoggedInUser() %>	
		<%=fbFun.getFB_id() %>
		<TABLE>
		<TR COLSPAN = 2  align=center>
			<FONT SIZE = 4 COLOR = red><B>請輸入書藉資料</B></FONT>
			</TR>
			<TR><TD><B>書籍編號</B></TD>
			<TD><INPUT type="text" name=tbxBookID></TD></TR>
				<TR><TD><B>書籍名稱</B></TD>
			<TD><INPUT type="text" size=70 name=tbxTitle></TD></TR>
			<TR><TD><B>出版日期</B></TD>
			<TD><INPUT type="text" name=tbxPDate value=<%= date%>>
			</TD></TR>
			<TR><TD><B>作  者</B></TD><TD>
			<INPUT type="text" name=tbxAuthor></TD></TR>
			<TR><TD><B>價  格</B></TD>
			<TD><INPUT type="text" name=tbxPrice value=0></TD></TR>
			<TR><TD><B>總頁數</B></TD>
			<TD><INPUT type="text" name=tbxPages value=0></TD></TR>
			<TR><TD><B>備  註</B></TD></TR>
		</TABLE>
	
		<TEXTAREA rows=5 cols=40 name=txtaMemo></TEXTAREA><P></P>
		<INPUT type="submit" value="送出資料" name=submitData>
	
	</FORM>
</body>
</html>